package com.yyw.gulimall.elasticsearch.feign;

import com.yyw.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 易煜玮
 * @ClassName ProductFeign.java
 * @Description 远程调用商品服务
 * @createTime 2020年12月05日 16:02:00
 */
@FeignClient("gulimall-product")
public interface ProductFeign {
    /**
     * 获取属性的信息
     */
    @RequestMapping("/product/attr/info/{attrId}")
    public R attrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 根据ID列表查询品牌信息
     * @param brandIds
     * @return
     */
    @GetMapping("/product/brand/getByIdList")
    public R getBrandByIds(@RequestParam("brandIds")List<Long> brandIds);
}
